<include file="Public/min-header"/>
<div class="wrapper">
    <include file="Public/breadcrumb"/>
    <!-- Main content -->
    <section class="content">
        <div class="container-fluid">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title"><i class="fa fa-list"></i> 销售员等级管理</h3>
                </div>
                <div class="panel-body">
                    <div class="navbar navbar-default">
                        <form action="" id="form2" class="navbar-form form-inline" method="post"    >
                            <div class="form-group">
                                <input   name="id" id="id" type="hidden" value="{$info.id}"/>
                                <input class="form-control" name="name" id="name" type="text" value="{$info.name}"/>
                               <!-- <select name="type_id" id="type_id" class="form-control">
                                    <option value="">所有分类</option>
                                    <foreach name="goodsTypeList" item="v" key="k" >
                                        <option value="{$v['id']}">{$v['name']}</option>
                                    </foreach>
                                </select>-->
                            </div>
                            <div class="form-group">

                                <button type="button"  onclick="du_submit();" class="btn btn-info pull-right">

                                    <if condition="$info eq ''">
                                        添加
                                        <else/>
                                        修改
                                    </if>
                                </button>
                            </div>
                            <!--<div class="form-group">
                                <select name="type_id" id="type_id" class="form-control">
                                    <option value="">所有分类</option>
                                    <foreach name="goodsTypeList" item="v" key="k" >
                                        <option value="{$v['id']}">{$v['name']}</option>
                                    </foreach>
                                </select>
                            </div>
                            <div class="form-group">
                                <button type="submit" onclick="ajax_get_table('search-form2',1)" id="button-filter" class="btn btn-primary pull-right">
                                    <i class="fa fa-search"></i> 筛选
                                </button>
                            </div>
                            <button type="submit" onclick="location.href='{:U('Admin/goods/addEditSpec')}'" id="button-filter2" class="btn btn-primary pull-right">
                                <i class="fa fa-plus"></i> 添加规格
                            </button>-->
                        </form>

                    </div>
                    <div >
                        <form method="post" enctype="multipart/form-data" target="_blank" id="form-goodsType">
                            <div class="table-responsive">
                                <table class="table table-bordered table-hover">
                                    <thead>
                                    <tr>
                                        <th class="sorting text-left">ID</th>
                                        <th class="sorting text-left">名称</th>
                                        <th class="sorting text-left">状态</th>
                                        <th class="sorting text-right">操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <volist name="lists" id="list">
                                        <tr>

                                            <td class="text-right">{$list.id}</td>
                                            <td class="text-left">{$list.name}</td>
                                            <td class="text-left">
                                                <img width="20" height="20" src="__PUBLIC__/images/<if condition='$list[status] eq 1'>yes.png<else />cancel.png</if>" onclick="changeTableVal('sales_cate','id','{$list.id}','status',this)"/>

                                            </td>


                                            <td class="text-right">
                                                <a href="{:U('Admin/Sales/cateList',array('id'=>$list['id']))}" data-toggle="tooltip" title="" class="btn btn-primary" data-original-title="编辑"><i class="fa fa-pencil"></i></a>
                                                <a href="javascript:del_fun('{:U('Sales/delSalesCate',array('id'=>$list['id']))}');" id="button-delete6" data-toggle="tooltip" title="" class="btn btn-danger" data-original-title="删除"><i class="fa fa-trash-o"></i></a></td>
                                        </tr>
                                    </volist>
                                    </tbody>
                                </table>
                            </div>
                        </form>
                        <div class="row">
                            <div class="col-sm-6 text-left"></div>
                            <div class="col-sm-6 text-right">{$page}</div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
        <!-- /.row -->
    </section>
    <!-- /.content -->
</div>
<!-- /.content-wrapper -->




<script>
    function du_submit(){



        if($('#name').val() == '' ){

            layer.alert('名称不能为空', {icon: 2});
            return false;
        }
        $('#form2').submit();


    }
</script>

</body>
</html>